package com.ushio.gougouwangguo.controller;

import com.ushio.gougouwangguo.entity.qo.AdventureQo;
import com.ushio.gougouwangguo.service.AdventureService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/adventure")
@Tag(name = "adventure", description = "探险")
public class AdventureController {

    @Autowired
    AdventureService adventureService;
    @PostMapping("save-adventure-log")
    @Operation(summary = "开始探险",description = "开始探险")
    public void saveAdventureLog(@RequestBody AdventureQo adventureQo){
        try{

            adventureService.saveAdventureLog(adventureQo);

        }catch (Exception e){

            e.printStackTrace();

        }
    }

}
